package 设计模式第一章;
//1.单向关联
//2.双向关联
//3.多重关联
//4.聚合关系
//5.组合关系
//6.自关联

class Game {
  /*  private static Game instance;*/
    public Game() {
       /* instance = new Game();*/
        System.out.println("方法初始化...............");
    }

    /*public static  Game start() {
        if(instance == null) {
            instance = new Game();
            System.out.println("方法初始化...............");
        }
        return instance;
    }
    public void load() {
        System.out.println("游戏加载中...............");
    }*/
}

public class 关联关系 {
    public static void main(String[] args) {
        System.out.println("----------------------------");
       /* Game game1 = Game.start();
        game1 = Game.start();*/
    Game game = new Game();
        game = new Game();
        game = new Game();

    }
}
